package ys.db2es.pojo;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
@JsonIgnoreProperties(ignoreUnknown = true)
public class Book implements Serializable,IdAble {

    private String id;

    private String name;

    private String auth;

    private Long count;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createTime;

    private String desc;

    @JsonIgnore
    @Override
    public String getIdStr() {
        return null;
    }

    @JsonIgnore
    @Override
    public void setIdStr(String idStr) {
        this.id = idStr;
    }
}
